export const tableOption = {
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    dialogWidth:'70%',
    printBtn: false,
    searchSize: 'mini',
    addBtn: false,
    delBtn: false,
    editBtn: false,
    selection: true,
    searchMenuSpan: 6,
    column: [{
        label: '标识',
        prop: 'id',
        hide: true,
        display: false
      }, {
        label: '年份',
        prop: 'workTime',
        type: 'year',
        format: 'yyyy',
        valueFormat: 'yyyy',
        search: true,
        hide: true,
        display: false
      }, {
        label: '月份',
        prop: 'planMonth',
        search: true,
        display: false
      }, {
        label: '周',
        prop: 'planWeek',
        display: false
      }, {
        label: '周期(周)',
        prop: 'workCycle',
        type: 'select',
        dicUrl: '/admin/dict/type/plan_week_cycle',
        display: false,
        rules: [{
          required: true,
          message: '请选择周期',
          trigger: 'blur'
        }]
      }, {
        label: '票种',
        prop: 'ticketType',
        type: 'select',
        dicUrl: '/support/swpmticketcardtype/dict',
        props: {
          label: 'mainName',
          value: 'mainEnName'
        },
        search: true,
        display: false,
        rules: [{
          required: true,
          message: '请选择票种',
          trigger: 'blur'
        }]
      }, {
        label: '票价',
        prop: 'ticketPrice',
        type: 'number',
        precision: 2,
        display: false
      }, {
        label: '车票次数',
        prop: 'ticketTimes',
        type: 'number',
        precision: 0,
        display: false
      }, {
        label: '车票有效期',
        prop: 'activeTime',
        // type: 'number',
        // precision: 0,
        display: false
      }, {
        label: '最晚使用时间',
        prop: 'latestStartTime',
        type: 'datetime',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        format: 'yyyy-MM-dd',
        display: false
      }, {
        label: '张数',
        prop: 'ticketNumber',
        type: 'number',
        precision: 0,
        display: false
      }, {
        label: '起号/止号',
        prop: 'startEndNo',
        display: false,
        rules: [{
          required: true,
          message: '请输入起号/止号',
          trigger: 'blur'
        }]
      }, {
        label: '车票用途',
        prop: 'ticketPurpose',
        display: false,
        rules: [{
          required: true,
          message: '请输入车票用途',
          trigger: 'blur'
        }]
      }, {
        label: '计划完成时间',
        prop: 'planFinishTime',
        type: 'date',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        format: 'yyyy-MM-dd',
        display: false
      }, {
        label: '实际完成时间',
        prop: 'actualFinishTime',
        type: 'date',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        format: 'yyyy-MM-dd',
        search: true,
        searchLabelWidth: 100,
        display: false
      }, {
        label: '清洗后数量',
        prop: 'cleanedNumber',
        type: 'number',
        precision: 0,
        rules: [{
          required: true,
          message: '请输入清洗后数量',
          trigger: 'blur'
        }],
        display: false
      }, {
        label: '折损数量',
        prop: 'lossNumber',
        type: 'number',
        precision: 0,
        display: false,
        rules: [{
          required: true,
          message: '请输入折损数量',
          trigger: 'blur'
        }]
      }, {
        label: '未清洗数量',
        prop: 'uncleanNumber',
        type: 'number',
        precision: 0,
        display: false,
        rules: [{
          required: true,
          message: '请输入未清洗数量',
          trigger: 'blur'
        }]
      }, {
        label: '是否完成清洗',
        prop: 'isFinish',
        type: 'select',
        search: true,
        searchLabelWidth: 100,
        dicData: [{
          label: '是',
          value: '1'
        }, {
          label: '否',
          value: '0'
        }],
        display: false
      }, {
        label: '未完成情况说明',
        prop: 'unfinishReason',
        display: false
      }, {
        label: '审批状态',
        prop: 'checkStatus',
        type: 'select',
        dicUrl: '/admin/dict/type/check_status',
        display: false
      }, {
        label: '审核人',
        prop: 'checkPersonId',
        hide: true,
        display: false
      }, {
        label: '审核时间',
        prop: 'checkTime',
        hide: true,
        display: false
      }, {
        label: '备注',
        prop: 'remark',
        type: 'textarea',
        maxRows: 6,
        minRows: 4,
        display: false
      }, {
        label: '创建人ID',
        prop: 'creatorId',
        hide: true,
        display: false
      }, {
        label: '创建人名称',
        prop: 'creatorName',
        hide: true,
        display: false
      }, {
        label: '创建时间',
        prop: 'createtime',
        hide: true,
        display: false
      }]
  };
 
export const dayPlanOption = {
  selectable: row => {
    return row.$cellEdit === true
  },
  column: [{
      label: '标识',
      prop: 'id',
      hide: true,
      display: false
    }, {
      label: '周',
      prop: 'planWeek',
      type: 'select',
      value: null,
      width: 100,
      cell: true,
      clearable: false
    },{
     label: '计划完成时间',
     prop: 'planFinishTime',
     type: 'date',
     format: 'yyyy-MM-dd',
     valueFormat: 'yyyy-MM-dd HH:mm:ss',
     width: 160,
     cell: true
   }, {
    "label": "票种",
    "prop": "ticketType",
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    cascaderItem: ["ticketName"],
    cell:true,
    display: false,
    hide: true
  }, {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketName",
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      // component: "ticket-select",
      // params: {
      //   valueKey: "ticketPrice",
      //   unitKey: "ticketTimes"
      // },
      width: 150,
      filterable: true,
      cell: true
    },{
    label: '票价',
    prop: 'ticketPrice',
    type: 'number',
    precision: 2,
    cell: true,
    width: 150
  }, {
    label: '次数',
    prop: 'ticketTimes',
    type: 'number',
    cell: true,
    width: 150
  }, {
    label: '车票有效期',
    prop: 'activeTime',
    //type: 'number',
    cell: true,
    width: 160
  }, {
    label: '最晚使用时间',
    prop: 'latestStartTime',
    type: 'date',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    width: 160,
    cell: true
  }, {
    label: '张数',
    prop: 'ticketNumber',
    type: 'number',
    cell: true,
    width: 150
  },{
    "type": "select",
    "label": "线路",
    "prop": "lineCode",
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/support/swparamline/dict",
    rules: [{
      required: true,
      message: '请选择线路'
    }],
    cell: true,
    width: 150
  }, {
    "type": "select",
    "label": "车站",
    "prop": "stationCode",
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/support/swparamstation/dict/{{key}}",
    rules: [{
      required: true,
      message: '请选择车站'
    }],
    cell:true,
    width: 150
  }, {
    label: '车票回收员1',
    prop: 'personName',
    type: 'select',
    component: 'user-select',
    params: {
      userCodeKey: 'personId'
    },
    width: 150,
    cell: true
  }, {
    label: '车票回收员1工号',
    prop: 'personId'
  }, {
    label: '车票回收员2',
    prop: 'personTwoName',
    type: 'select',
    component: 'user-select',
    params: {
      userCodeKey: 'personTwoId'
    },
    width: 150,
    cell: true
  }, {
    label: '车票回收员2工号',
    prop: 'personTwoId'
  },
  //  {
  //   label: '审批状态',
  //   prop: 'checkStatus'
  // }
]
}
